package com.helloworld.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.helloworld.dao.PurchaselistDao;
import com.helloworld.pojo.Purchaselist;
import com.helloworld.service.PurchaselistService;

@Service
@Transactional
public class PurchaselistServiceImpl implements PurchaselistService{
	
	
	@Autowired
	private PurchaselistDao purchaselistDao;
	
	public List<Purchaselist> findByPage(String purchaseTime, Integer purchaseId, Integer invoiceNumber,String supplierName,String purchasePerson,Integer pageNum, Integer pageSize){
		return purchaselistDao.findByPage(purchaseTime, purchaseId,invoiceNumber,supplierName,purchasePerson,pageNum, pageSize);
	}

	@Override
	public int addPurchase(Purchaselist purchaselist) {
		// TODO Auto-generated method stub
		return purchaselistDao.addPurchase(purchaselist);
	}

	@Override
	public List<Purchaselist> findAll() {
		// TODO Auto-generated method stub
		return purchaselistDao.findAll();
	}


	@Override
	public List<Purchaselist> findByEntity(String time, Integer purchaseId,Integer invoiceNumber,String supplierName,String purchasePerson) {
		// TODO Auto-generated method stub
		return purchaselistDao.findByEntity(time,purchaseId,invoiceNumber,supplierName,purchasePerson);
	}

	@Override
	public int delPurchase(Integer purchaseId) {
		// TODO Auto-generated method stub
		return purchaselistDao.delPurchase(purchaseId);
	}
	
	

}
